﻿using DAQ.Common;
using System.Collections.Generic;

namespace DAQ.PROTOCOL
{
    public class INPUT_CURRENT_CONTROL_SET
    {
        byte[] _bytes = new byte[13];
        public static byte[] GetSendBytes(byte Addr, byte[] data)
        {
            List<byte> list = new List<byte>(data);           
            list.InsertRange(0,new byte[] { Addr, 0x2e });
            return BasicUtil.AppendChecksum(list.ToArray());
        }
        public static int GetResult(byte ret)
        {
            if (ret == 0xFB)// communication OK
            {
                return 0;
            }
            else if (ret == 0xFA)//communication FAIL
            {
                return 1;
            }
            else //EXCEPTION
            {
                return -1;
            }
        }
       // public static 
    }
}
    

    


